package com.situ.mall.admin.controller;

import com.situ.mall.admin.service.IStatisticsService;
import com.situ.mall.base.util.URLUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * ClassName: HomePageController
 * Package: com.situ.mall.admin.controller
 * Description:
 *
 * @Author Darling_达
 * @Create 2023-03-25 9:20
 * @Version 1.0
 */

@Controller
@RequestMapping(URLUtil.HOME)
public class HomePageController {

    @Autowired
    private IStatisticsService iStatisticsService;

    @GetMapping(URLUtil.PAGE)
    public String index(Model model){
        model.addAttribute(URLUtil.CODE, iStatisticsService.statistics());
        return URLUtil.HOME_HTML;
    }


}
